package io.github.mayubao.aidl.aidlserver;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.annotation.Nullable;
import android.util.Log;

public class AIDLService extends Service {

    private static final String TAG = AIDLService.class.getSimpleName();

    IMyAidlInterface.Stub binder = new IMyAidlInterface.Stub(){

        @Override
        public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {
            Log.i(TAG, String.format("IMyAidlInterface basicTypes***>>>anInt:%s, aLong:%s, aBoolean:%s, aFloat:%s, aDouble:%s, aString:%s", anInt, aLong, aBoolean, aFloat, aDouble, aString));
        }
    };

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return binder;
    }
}
